package Filefilter;

import java.io.File;
import java.io.FileFilter;

public class FileFilterImpl implements FileFilter {
    @Override
    public boolean accept(File pathname) {
        if(pathname.isDirectory())
        {
            return true;
            //判断是否为文件夹，是也返回true
        }
        return pathname.getName().toLowerCase().endsWith(".pdf");
        //在accept方法中定义筛选规则
    }
}
